var app = getApp();

Page({
    data: {
        navArr: [ {
            con: "待录用"
        }, {
            con: "已录用"
        }, {
            con: "已到岗"
        }, {
            con: "已结算"
        } ],
        current: 0,
        none: [ {
            img: "/hyb_jianzhi/images/none.png",
            con: "暂无待录用信息"
        } ],
        none1: [ {
            img: "/hyb_jianzhi/images/none.png",
            con: "暂无已录用信息"
        } ],
        none2: [ {
            img: "/hyb_jianzhi/images/none.png",
            con: "暂无已到岗信息"
        } ],
        none3: [ {
            img: "/hyb_jianzhi/images/none.png",
            con: "暂无已结算信息"
        } ]
    },
    timeJobDetailClick: function(n) {
        this.getform(n.detail.formId);
        var e = n.currentTarget.dataset.j_id;
        wx.navigateTo({
            url: "/hyb_jianzhi/job_detail/job_detail?j_id=" + e
        });
    },
    onLoad: function(n) {
        var e = n.index;
        console.log(e), console.log(wx.getStorageSync("openid")), this.getUserBaoming(e), 
        this.setData({
            current: e
        });
    },
    getform: function(n) {
        console.log(n), app.util.request({
            url: "entry/wxapp/Formid",
            data: {
                openid: wx.getStorageSync("openid"),
                formid: n
            },
            success: function(n) {}
        });
    },
    navTab: function(n) {
        var e = this;
        e.getform(n.detail.formId);
        var t = n.currentTarget.dataset.index;
        e.setData({
            current: t
        }), e.getUserBaoming(t);
    },
    getUserBaoming: function(n) {
        var e = this;
        app.util.request({
            url: "entry/wxapp/Userbaominglist",
            data: {
                openid: wx.getStorageSync("openid"),
                n_id: n
            },
            success: function(n) {
                console.log(n), e.setData({
                    list: n.data.data
                });
            }
        });
    },
    goPingClick: function(n) {
        this.getform(n.detail.formId);
        var e = n.currentTarget.dataset.b_id;
        console.log(1), wx.navigateTo({
            url: "/hyb_jianzhi/go_ping/go_ping?b_id=" + e
        });
    },
    delClick: function(n) {
        var e = this;
        e.getform(n.detail.formId);
        var t = n.currentTarget.dataset.b_id;
        app.util.request({
            url: "entry/wxapp/Baomingdel",
            data: {
                b_id: t
            },
            success: function(n) {
                e.getUserBaoming(e.data.current);
            }
        });
    },
    applyDetailClick: function(n) {
        wx.navigateTo({
            url: "/hyb_jianzhi/apply_detail/apply_detail"
        });
    },
    homeClick: function(n) {
        this.getform(n.detail.formId), wx.reLaunch({
            url: "/hyb_jianzhi/index/index"
        });
    },
    onShareAppMessage: function() {}
});